#!/usr/bin/env python
# encoding: utf-8
'''
@author: 王震
@license: 四川凡狼科技有限公司
@contact: 2668985108@qq.com
@file: message.py
@time: 2022/2/16 10:18
@desc:
'''

from main import db
import datetime


class Message(db.Model):
    __tablename__ = 'MESSAGE'

    id = db.Column(db.String(32), primary_key=True, unique=True, nullable=False, comment='留言id')
    shoe = db.Column(db.Integer, unique=False, nullable=False, default=2, comment='1 表示正常显示， 2 表示不显示')
    userId = db.Column(db.String(32), unique=False, nullable=False, comment='留言的用户id')
    info = db.Column(db.String(256), unique=False, nullable=False, comment='浏览详情')
    replyId = db.Column(db.String(32), unique=False, nullable=True, comment='被回复的留言id')
    replyInfo = db.Column(db.String(256), unique=False, nullable=True, comment='被回复的留言信息')
    createTime = db.Column(db.DateTime, unique=False, nullable=True, default=datetime.datetime.now, comment='创建时间')
    updateTime = db.Column(db.DateTime, unique=False, nullable=True, default=datetime.datetime.now,
                           onupdate=datetime.datetime.now, comment='更新时间')
